//
//  ShouZhiMingXiViewController.m
//  firstpoint
//
//  Created by 泽中 on 2017/7/19.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "ShouZhiMingXiViewController.h"
#import "ShouZhiMingXiTableViewCell.h"

@interface ShouZhiMingXiViewController ()<UITableViewDelegate,UITableViewDataSource>

{
    UITableView*tabView;//表
}


@end

@implementation ShouZhiMingXiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"收支明细";
    [self setUI];
    [self setTab];}
-(void)setUI
{
    UIImageView*imgView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 64, width_screen, 90)];
    imgView.backgroundColor=LRRGBColor(46, 165, 117);
    [self.view addSubview:imgView];
    
    UILabel*lab=[[UILabel alloc]initWithFrame:CGRectMake(10, 20, width_screen-10, 13)];
    lab.text=@"账户元宝";
    lab.textColor=[UIColor whiteColor];
    lab.font=[UIFont systemFontOfSize:13];
    [imgView addSubview:lab];
    // num
    UILabel*numLab=[[UILabel alloc]initWithFrame:CGRectMake(10, 43, width_screen-10, 30)];
    numLab.text=@"268";
    numLab.textColor=[UIColor whiteColor];
    numLab.font=[UIFont systemFontOfSize:30];
    [imgView addSubview:numLab];
}
-(void)setTab
{
    tabView=[[UITableView alloc]initWithFrame:CGRectMake(0, 144, width_screen, height_screen-144) style:1];
    tabView.separatorStyle=0;
    tabView.delegate=self;
    tabView.dataSource=self;
    [tabView registerClass:[ShouZhiMingXiTableViewCell class] forCellReuseIdentifier:@"cell"];
    
    [self.view addSubview:tabView];
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 70;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    ShouZhiMingXiTableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:@"cell"];
    cell.payTypeLab.text=@"支出-门店购物";
    
    cell.timeLab.text=@"1992-10-9 10:11";
    cell.yueLab.text=@"余额：1800";
    cell.jineLab.text=@"-300";
    return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}
-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
    
    UIView*view=[[UIView alloc]initWithFrame:CGRectMake(0, 0, width_screen, 40)];
    UIButton*button=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, width_screen, 40)];
    button.backgroundColor=LRRGBColor(250, 250, 250);
    [button setTitle:@"加载更多" forState:0];
    [button addTarget:self action:@selector(jiazaiGengduoBtnClick) forControlEvents:UIControlEventTouchUpInside];
    button.titleLabel.font=[UIFont systemFontOfSize:14];
    [button setTitleColor:LRRGBColor(22, 141, 210) forState:0];
    [view addSubview:button];
    UIView*huiseView=[[UIView alloc]initWithFrame:CGRectMake(0, 40, width_screen, 10)];
    huiseView.backgroundColor=LRRGBColor(235, 240, 243);
    [view addSubview:huiseView];
    
    
    return view;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
